﻿@model IEnumerable<EventSys.BussinesEntities.Auspiciador>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@using (Html.BeginForm())
{
    <fieldset>
        <legend></legend><b>Nombres o DNI:</b>
        <input type="search" name="criterio" value="" placeholder="Ingrese Nombres o DNI" />
        <input type="submit" name="buscar" value="Buscar" class="k-button" />

    </fieldset>
}

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.RazonSocial)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Marca)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Direccion)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Telefono)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PageWeb)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Representante)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RucDni)
        </th>

        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.RazonSocial)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Marca)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Direccion)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PageWeb)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Representante)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RucDni)
        </td>
                <td>
                    @Html.ActionLink("Editar", "Edit", new { id = item.idAuspiciador }) |
                    @Html.ActionLink("Eliminar", "Delete", new { id = item.idAuspiciador },
                                        new { onClick = "return confirm('Desea Eliminar Auspiciasdor:" + @item.RazonSocial + "?');" })|
                    @Ajax.ActionLink("Detalles", "Index", new AjaxOptions()
               {
                   Url = Url.Action("Details", new { id = item.idAuspiciador }),
                   UpdateTargetId = "upDetails",
                   OnSuccess = "OnSuccessDetails"
               })
                </td>
    </tr>
}

</table>
